/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import java.util.ArrayList;
import java.util.Calendar;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author baikuam0
 */
public class EdgeTest {

    Service testService;
    public EdgeTest() {
    }

    @BeforeClass
    public static void setUpClass() throws Exception {
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
    }

    @Before
    public void setUp() {
         database.openBusDatabase();
         Roster newRoster = new Roster();
         ArrayList<ArrayList<Bus>> buses = newRoster.assignBuses();
         ArrayList<Bus> busesToday = buses.get(0);
         Service testService = busesToday.get(0).getShifts().get(0).getService();
  
         
    }

    @After
    public void tearDown() {
    }

    /**
     * Test of getDuration method, of class Edge.
     */
    @Test
    public void testGetDuration() {
        System.out.println("getDuration");
        Edge instance = new Edge(null, null, 30, null);
        int expResult = 30;
        int result = instance.getDuration();
        assertEquals(expResult, result);
        
    }


    /**
     * Test of getStartTime method, of class Edge.
     */
    @Test
    public void testGetStartTime() {
        System.out.println("getStartTime");
        Calendar startTime = (Calendar) Calendar.getInstance();
        Edge instance = new Edge(null, startTime, 0, null);
        Calendar expResult = startTime;
        Calendar result = instance.getStartTime();
        assertEquals(expResult, result);
       
    }

    @Test
    public void testGetService(){
        System.out.println("getService");
        Edge instance = new Edge(testService, null, 0, null);
        Service expResult = testService;
        Service result = instance.getService();
        assertEquals(expResult, result);
    }

    @Test
    public void testGetEndLocation(){
        System.out.println("getEndLocation");
        Location test = new Location(771);
        Edge instance = new Edge(null, null, 0, test);
        Location expResult = test;
        Location result = instance.getEndLocation();
        assertEquals(expResult, result);

    }

}